<template>
    <el-dialog v-if="dialogVisible" :close-on-click-modal='false' title="飞瓜数据" top="5vh" :visible.sync="dialogVisible" @close="resetForm()" width="800px">
        <el-table :data="tableData" class="com_table fx_table source_table" ref="mtTable" height="600">
            <el-table-column prop="" label="商品/价格" min-width="500">
                <template slot-scope="scope">
                    <div class="fx_goods flexbox flexcenter">
                        <img :src="scope.row.ioc_url" alt="" class="fx_goods_img">
                        <div class="fx_goods_info">
                            <div class="fx_goods_name">{{scope.row.title}}</div>
                            <div class="fx_goods_price">¥{{scope.row.price_}}</div>
                        </div>
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="" label="预估销量" width="115">
                <template slot-scope="scope">
                    {{scope.row.sales_volume}}
                </template>
            </el-table-column>
            <el-table-column prop="" label="预估销售额" width="115">
                <template slot-scope="scope">
                    {{scope.row.total_sales}}
                </template>
            </el-table-column>
        </el-table>
        <span slot="footer" class="dialog-footer">
            <el-button size="small" type="primary" @click="resetForm()" class="el-button-width">关 闭</el-button>
        </span>
    </el-dialog>
</template>

<script>
export default {
    name: "",
    data() {
        return {
            loading: false,
            dialogVisible: false,
            tableData:[],
        };
    },
    created() {},
    methods: {
        getData(row){
            this.dialogVisible = true
            for(let i in row.img_fg_carry_product_180){
                row.img_fg_carry_product_180[i].ioc_url = row.img_fg_carry_product_180[i].ioc_url.substring(
                    row.img_fg_carry_product_180[i].ioc_url.lastIndexOf("=")+1
                );
            }
            this.tableData = row.img_fg_carry_product_180
        },
        resetForm(){
            this.dialogVisible = false
        }
    },
    components: {},
};
</script>


<style scoped>
.fx_goods_img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
}
.fx_goods_info {
    margin-left: 12px;
    min-width: 0;
}
.fx_goods_name {
    font-size: 14px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fx_goods_price{
    font-size: 14px;
    color: #FE6262;
    line-height: 20px;
    margin-top: 8px;
}
</style>
